package com.plian.system.vo.pf;

import com.plian.system.entity.pf.AppraisalIndex;
import com.plian.system.node.INode;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author: Take-off
 * @Description: TODO
 * @Date: 2022/12/13 4:55 PM
 * @Version: 1.0
 **/
@EqualsAndHashCode(callSuper = true)
@Data
@ApiModel(value = "AppraisalIndexVO", description = "绩效考评指标")
public class AppraisalIndexVO extends AppraisalIndex implements INode<Long, AppraisalIndexVO> {

    @ApiModelProperty(value = "层级")
    private Integer level;

    private List<AppraisalIndexVO> children;

    @Override
    public List<AppraisalIndexVO> getChildren() {
        if (this.children == null) {
            this.children = new ArrayList<>();
        }
        return this.children;
    }
}
